package org.sixtynine.stock.dao;

/**
 * @author Thilan
 *
 */

import java.util.List;

import org.sixtynine.stock.dto.GridPramDTO;
import org.sixtynine.stock.dto.Page;
import org.sixtynine.stock.entity.User;
import org.springframework.transaction.annotation.Transactional;

@Transactional(readOnly = true)
public interface UserDao extends AbstractDao<User, Integer> {

	void saveUser(User user);

	/**
	 * @param userName
	 * @return
	 */
	User findUserByUserName(String userName);
	
	/**
	 * 
	 * 
	 * @param name
	 * @return
	 */
	List<User> findUser(String name);
	
	List<User> searchUser(int categoryId);

	public Page<User> searchUser(int categoryId,
			 GridPramDTO gridPramDTO);
	
	public boolean isEmailExist(String email);
	
	public boolean isUserExist(String userName);
}
